The present invention generally relates to the field data storage systems, and particularly to a system and method for reading and writing N-way mirrored storage devices.
The efficient and persistent storage of electronic data is one of the most important aspects of modern business. Electronic data may contain information from all aspects of business and life in general. Therefore, data must not only be stored efficiently and effectively, but that data must also be stored in a manner to ensure the veracity of the data. Corruption of this data may have enormous consequences, especially in instances in which the error is not xe2x80x9ccaughtxe2x80x9d, which may cause incorrect results and further inefficiencies. One method and system utilized to promote data integrity is a redundant array of inexpensive disks (RAID) system, which may provide a group of drives in a system that will continue to provide access to data even in the event of drive failure. However, data corruption may still occur in a RAID system. For example, data corruption has occurred in the past because disk drives had erroneously reported successful completion of WRITE commands that had not, in fact, been successfully completed. This may occur due to disk drive vendor defects, and the like.
Additionally, some controllers of RAID system may not handle xe2x80x9cunreliable drivexe2x80x9d type errors. One method of addressing this problem was to rely on rigorous pre-certification of disk drives, but such a reliance may be unsuitable as certain manufacturers may desire further guarantees of drive reliability. Other methods utilized to address this problem include a separate xe2x80x9cdata scrubberxe2x80x9d process, issue all write requests with verify requested, calculate and store a CRC along with the data, and the like. However, these solutions may involve significant performance degradation. Further, the inclusion of CRC may require specialized CRC hardware in order to avoid performance degradation, thereby making such an option unsuitable for existing devices and may require extensive modifications.
Therefore, it would be desirable to provide a system and method for data verification in a RAID system.
Accordingly, the present invention is directed to a system and method for reading and writing N-way mirrored storage devices. In a first aspect of the present invention, a method of reading data in a data storage system is provided, wherein the data storage system includes at least a first data storage device, a second data storage device and a third data storage device. A first item of data is read from a first data storage device, a second item of data is read from a second data storage device, and a third item of data is read from a third storage device. The first item of data from the first storage device is compared with the second item of data from the second storage device and the third item of data from the third storage device. If the first item of data matches at least one of the second item of data and the third item of data, the first item of data is valid. If the first item of data does not match at least one of the second item of data and the third item of data, the second item of data is valid.
In a second aspect of the present invention, a data storage system includes a first storage device, a second data storage device, and a third data storage device, the storage devices suitable for storing electronic data. The first storage device includes a first item of data, the second storage device includes a second item of data, and the third storage device includes a third item of data. A storage device controller is coupled to the first storage device, the second storage device and the third storage device. The storage device controller reads the first item of data from the first data storage device, the second item of data from the second data storage device and the third item of data from the third data storage device and compares the first item of data from the first storage device with the second item of data from the second storage device and the third item of data from the third storage device. If the first item of data matches at least one of the second item of data and the third item of data, the first item of data is valid. If the first item of data does not match at least one of the second item of data and the third item of data, the second item of data is valid.
In a third aspect of the present invention, a method of performing a read from a data storage system includes receiving a read request from a client for an item of data from a data storage system, the data storage system including a plurality of storage devices. Data is obtained from at least three data storage devices included in the data storage system, wherein if a device of the at least three data storage devices fails to return the requested item of data, an additional storage device is queried for corresponding data. Validity of the obtained items of data may be determined. For example, determining validity may include comparing a first item of data from a first storage device of the plurality of storage devices with a second item of data from a second storage device of the plurality of storage devices and a third item of data from a third storage device of the plurality of devices. If the first item of data matches at least one of the second item of data and the third item of data, the first item of data is valid. If the first item of data does not match at least one of the second item of data and the third item of data, the second item of data is valid.